using System;
using System.Collections.Generic;
using System.Linq;
namespace BuddhistSchools.DTO.Models
{
    public partial class User
    {
        public User GetUser(string userName)
        {
            dbBuddhistSchoolsContext db = new dbBuddhistSchoolsContext();
            var us=  db.Users.Where(u => u.UserName == userName);
            if (us.Count()>0)
            {
                var u = us.First();
                return u;
            }
            else
            {
                return null;
            }
        }
    }
}
